package com.ssy.lingxi.product.api.feign;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.product.api.model.request.warehouse.InvoicesAddFeignRequest;
import com.ssy.lingxi.product.api.model.request.warehouse.InvoicesDetailsListRequest;
import com.ssy.lingxi.product.api.model.response.warehouse.InvoicesDetailsResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * 单据管理
 * @author wrc
 * @date 2020/9/7
 */
@FeignClient(name = "product-service")
public interface InvoicesControllerFeign {

    /**
    * 添加单据内部接口
    * @author wrc
    * @date 2020/9/12
    */
    @PostMapping("/product/invoices/feign/add")
    Wrapper<InvoicesDetailsResponse> invoicesAddFeign(@RequestBody InvoicesAddFeignRequest request);


    /**
    * 单据审查
    * @author wrc
    * @date 2020/9/24
    */
    @PostMapping("/product/invoices/batch/review")
    Wrapper<InvoicesDetailsResponse> invoicesReview(@Valid @RequestBody InvoicesDetailsListRequest request);
}
